package top.braycep.bean;

import cn.hutool.log.LogFactory;
import lombok.Data;
import org.beetl.sql.annotation.entity.AutoID;
import org.beetl.sql.annotation.entity.Table;
import org.beetl.sql.annotation.entity.UpdateIgnore;
import org.beetl.sql.fetch.annotation.Fetch;
import org.beetl.sql.fetch.annotation.FetchMany;

import java.util.ArrayList;
import java.util.List;

@Data
@Table(name = "table_jarfiles")
@Fetch
public class JarFile {
    @AutoID
    @UpdateIgnore
    private Long id;
    private String filename;
    private String filepath;
    private Boolean isDefault;

    @FetchMany(value = "jarId")
    List<JarInnerFile> innerFiles = new ArrayList<>();

    public JarFile(String filename, String filepath) {
        this.filename = filename;
        this.filepath = filepath;
    }

    public JarFile() {

    }
}
